﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FactoryMethod.Example02
{
    public static class Factory
    {
        public static IProduct ConcreteProduct(Category category)
        {
            switch (category)
            {
                case Category.ProductA:
                    return new ProductA();
                case Category.ProductB:
                    return new ProductB();
                case Category.ProductC:
                    return new ProductC();
                default:
                    throw new NotSupportedException();
            }
        
        }
    }
}
